package com.ricchieri.service.interf;

import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.ricchieri.filter.UserFilter;
import com.ricchieri.model.User;

public interface IUserService {

	@Transactional(readOnly = false)
	public void addUser(User user);
	
	@Transactional(readOnly = true)
	public List<User> getAllUsers();

	@Transactional(readOnly = true)
	public List<User> getAllUserByFilter(UserFilter user);

	@Transactional(readOnly = true)
	public List<User> getAllUserPaginatedByFilter(UserFilter user, int page);

	@Transactional(readOnly = true)
	public Integer getAllUserCountByFilter(UserFilter user);
	
	@Transactional(readOnly = true)
	public User getUserByUsername(String userName);

	@Transactional(readOnly = false)
	public void unauthorizeUser(User user);

	@Transactional(readOnly = false)
	public void deleteUser(User selectedUser);

	@Transactional(readOnly = false)
	public void updateUser(User user);

	@Transactional(readOnly = true)
	public User getUserByFilter(UserFilter user);

	public User getUserById(UserFilter userFilter);

	public Map<String, String> getComboUserByRole(UserFilter userFilter);

	public void authorizeUser(User user);

}